package cn.stylefeng.guns.modular.service;

import cn.stylefeng.guns.modular.entity.ScheduleFormItem;
import cn.stylefeng.guns.modular.entity.ScheduleFrameItem;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ScheduleFormItemService {

    /**
     * 保存日程表项
     * @param scheduleFormItem
     * @return
     */
    public int saveScheduleFormItem(ScheduleFormItem scheduleFormItem);

    /**
     * 设置日程项的日程表id
     * @param sformId
     * @return
     */
    public int setFormId(int sformId);

    /**
     * 根据sformId删除日程项
     * @param sformId
     * @return
     */
    public int deleteBySformId(int sformId);

    /**
     * 根据日程表Id查找其日程项
     * @param sformId
     * @return
     */
    public List<ScheduleFormItem> selectSformItemBySformId(int sformId);

    /**
     * 查看该日程表下哪个序号的所有日程项
     * @param sformId
     * @param itemSerial
     * @return
     */
    public List<ScheduleFormItem> selectSformItemBySformIdAndItemSerial(@Param("sformId") int sformId, @Param("itemSerial") int itemSerial);


    /**
     * 显示今日的日程项信息
     * @param userId
     * @param todayDate
     * @return
     */
    public List<ScheduleFormItem> showTodaySfromItem(@Param("userId") long userId,@Param("todayDate") String todayDate);

    /**
     * 显示该日程表某框架项和某天的所有日程项
     * @param sformId
     * @param sframeItemSerail
     * @param sformItemDate
     * @return
     */
    public List<ScheduleFormItem> showCurrSformItem(@Param("sformId") int sformId, @Param("sframeItemSerail") int sframeItemSerail, @Param("sformItemDate") String sformItemDate);


    /**
     * 根据日程项id进行查询
     * @param sformItemId
     * @return
     */
    public ScheduleFormItem selectSformItemById(@Param("sformItemId") int sformItemId);

    /**
     * 保存修改日程项信息
     * @param scheduleFormItem
     * @return
     */
    public int updateSformItem(@Param("scheduleFormItem") ScheduleFormItem scheduleFormItem);

    /**
     * 根据日程项id进行删除
     * @param sformItemId
     * @return
     */
    public int deleteSformItemById(@Param("sformItemId") int sformItemId);
}
